<template>
  <div class="home">
    <header>
      考勤打卡，灵活便捷
    </header>

    <section>
        <div class="sec_one">
          <div @click="toRouters('/PunchCard')"><span class="iconfont">&#xeb7f;考勤打卡</span></div>
          <div @click="toRouters('/evection')"><span class="iconfont">&#xeb80;出差申请</span></div>
        </div>

        <div class="sec_two">
          <div @click="toRouters('/leave')"><span class="iconfont">&#xeb81;请假调休</span></div>
          <div>
            <div @click="toRouters('/audit')"><span class="iconfont">&#xeb82;我的审核</span></div>
            <div><span class="iconfont">&#xeb83;我发起的</span></div>
          </div>
        </div>

        <div class="sec_three">
          <div @click="toRouters('/PowerNotes')"><span class="iconfont">&#xeb84;日程管理</span></div>
          <div><span class="iconfont">&#xeb85;待办事项</span></div>
        </div>

        <div class="sec_four">
          <span class="iconfont">&#xeb86;考勤统计</span>
        </div>

        <div class="backs"></div>
    </section>
    
  </div>
</template>

<script>
import {useRouter} from 'vue-router'
export default {
  name: 'Home',
  components: {
    
  },
  setup(){
    let router = useRouter()
    const toRouters = (name) => {
      router.push(name)
    }
    
    return {
      toRouters
    }
  }
}
</script>

<style lang="scss">
@import '../style/minxi.scss';
.home,body,html{
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  font-size: 14px;
  header{
    width: 100%;
    height: 227px;
    background: linear-gradient(to bottom ,rgb(241, 136, 16),rgb(240, 238, 235));
    color: rgba(255, 255, 255, 100);
    font-family: SourceHanSansSC-regular;
    line-height: 60px;
    padding: 0 14px;
    box-sizing: border-box;
  }

  section{
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    flex: 1;
    overflow: auto;
    padding: 0 10px;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    .sec_one{
      @include buju(198px);
      z-index: 1;
      div{
        @include padd;
      }
    }

    .sec_two{
      @include buju(196px);
      div{
        @include padd;
      }
    }

    .sec_three{
      @include buju(200px);
      div{
        @include padd;
      }
    }

    .sec_four{
      width: 354px;
      height: 130px;
      background: #58E37D;
      color: white;
      margin-top: 6px;
      @include padd;
      animation: proRotate 1.2s ease-in-out 500ms alternate none 1;
    }
    
  }
}
section>div>div>span{
  display: inline-block;
    width: 86px;
    height: 21px;
    background: rgba($color: #FFFFFF, $alpha: .4);
    border-radius: 2px;
    text-align: center;
    line-height: 21px;
}
section>div>div>div>span{
  display: inline-block;
    width: 86px;
    height: 21px;
    background: rgba($color: rgba(88, 86, 86, 0.308), $alpha: .4);
    border-radius: 2px;
    text-align: center;
    line-height: 21px;
}

.sec_one>div:nth-child(1){
  @include whc(202px,198px,#0090FD);
  // background: url(../assets/2.jpg) no-repeat;
  animation: proRotate 1.2s ease-in-out 500ms alternate none 1;
}

.sec_one>div:nth-child(2){
  @include whc(140px,198px,#04D2F9);
  animation: proRotate 1.2s ease-in-out 500ms alternate none 1;
}

.sec_two>div:nth-child(1){
  @include whc(45%,100%,#24DE55);
  animation: proRotate 1.2s ease-in-out 500ms alternate none 1;
}

.sec_two>div:nth-child(2){
  width: 54%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  animation: proRotate 1.2s ease-in-out 500ms alternate none 1;
  div{
    width: 100%;
    height: 48%;
  }
}
.sec_two>div:nth-child(2)>div:nth-child(1){
  background: #F8D130;
  animation: proRotate 1.2s ease-in-out 500ms alternate none 1;
}
.sec_two>div:nth-child(2)>div:nth-child(2){
  background: #FF8E35;
  animation: proRotate 1.2s ease-in-out 500ms alternate none 1;
}

.sec_three>div:nth-child(1){
  @include whc(187px,197px,#F34747);
  animation: proRotate 1.2s ease-in-out 500ms alternate none 1;
}

.sec_three>div:nth-child(2){
  @include whc(159px,197px,#F8D130);
  animation: proRotate 1.2s ease-in-out 500ms alternate none 1;
}

section::-webkit-scrollbar{
  display: none;
}


@keyframes proRotate {
    0% {
          transform: perspective(400px) rotateX(45deg);
      }

      20% {
                transform: perspective(400px) rotateX(-45deg);
          }

            40% {
                transform: perspective(400px) rotateX(25deg);
            }

            60% {
                -webkit-transform: perspective(400px) rotateX(-25deg);
            }

            70% {
                -webkit-transform: perspective(400px) rotateX(10deg);
            }

            80% {
                -webkit-transform: perspective(400px) rotateX(-10deg);
            }

            100% {
                -webkit-transform: perspective(400px) rotateX(0deg);
    }
}
</style>
